import 'package:flutter/material.dart';
Color bg = const Color(0xFFf4f4f4);
Color btnBg = const Color(0xFFFF8954);

class ProductList extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SliverFixedExtentList(
      itemExtent: 90.0,
      delegate:
      SliverChildBuilderDelegate((BuildContext context, int index) {
        return Container(
          color: Colors.white,
          margin: const EdgeInsets.only(bottom: 5.0),
          padding: EdgeInsets.all(10.0),
          child: Row(
            children: <Widget>[
              Image(
                image: AssetImage("images/pro_01.jpg"),
                width: 48.0
              ),
              Expanded(
                child:Container(
                  padding: EdgeInsets.fromLTRB(15.0, 0.0, 25.0, 0.0),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Text('及贷1',
                        textAlign: TextAlign.left,
                        textScaleFactor: 1.2,
                        style: TextStyle(fontWeight: FontWeight.w500)
                      ),
                                          Row(
                        children: <Widget>[
                          new Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: <Widget>[
                              new Text('1000~3000元',style: TextStyle(color: btnBg)),
                              new Text('可贷金额'),
                            ]
                          ),
                          new Expanded(
                            child: Row(
                              mainAxisAlignment: MainAxisAlignment.end,
                              children:<Widget>[
                                new Column(
                                  mainAxisAlignment: MainAxisAlignment.end,
                                  children: <Widget>[
                                    new Text('0.4%', style: TextStyle(color: btnBg)),
                                    new Text('日利率'),
                                  ]
                                ),
                                
                              ]
                            )
                          )
                        ],
                      ),
                    ],
                  )
                ),
              ),
              RaisedButton(
                // padding: new EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 10.0), //padding
                child: new Text(
                  '立即借款',
                  style: new TextStyle(
                    fontSize: 14.0, //textsize
                    color: Colors.white,// textcolor
                  ),
                ),
                color: btnBg,
                elevation: 4.0,  //shadow
                splashColor: Colors.blueGrey, 
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.all(Radius.circular(25.0)),
                ),
                onPressed: () {}
              ),
            ],
          )
        );
      }, childCount: 10),
    );
  }
}
  